package com.kclm.xsap.dto.convert;


import com.kclm.xsap.dto.EmployeeDTO;
import com.kclm.xsap.entity.Employee;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 * @Author : lvhx
 * @Date: 2025/6/13 16:46
 * @Description:
 */
@Mapper(componentModel = "spring")
public interface EmployeeConvert {
    @Mappings({
            @Mapping(source = "id", target = "id"),//??没有id?
            @Mapping(source = "name",target = "name"),
            @Mapping(source = "avatarUrl",target = "avatarUrl"),
            //以消费记录的note为映射依据
            @Mapping(source = "roleType",target = "roleType")
    })
    EmployeeDTO toDTO(Employee employee);
}
